package action.custom;

import core.action.BaseAction;
import service.app.CreatKeyService;
import util.Sessions;

public class GetCompanyOrPersonalId extends BaseAction{
	private CreatKeyService creatKeyService;
	private String PFLAG;
	
	public String getPFLAG() {
		return PFLAG;
	}

	public void setPFLAG(String pFLAG) {
		PFLAG = pFLAG;
	}

	public String geCompanyId(){
		int cid = this.creatKeyService.creatKeyFull(2);
		Sessions.set("companyid", cid);
		super.successResultValue = "NewCompanyBasic";
		return "success";
	}
	
	public String gePersonalId(){
		int cid = this.creatKeyService.creatKeyFull(1);
		Sessions.set("companyid", cid);
		super.successResultValue = "NewPersonalBasic";
		return "success";
	}
	
	public String execute(){

		int cid = this.creatKeyService.creatKeyFull(2);
		Sessions.set("companyid", cid);
		return "success";
	}

	public CreatKeyService getCreatKeyService() {
		return creatKeyService;
	}
	public void setCreatKeyService(CreatKeyService creatKeyService) {
		this.creatKeyService = creatKeyService;
	}
}
